package cn.wolfcode.luowowo.serach.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

/**
 * Created by admin on 2019/8/22.
 */
@Setter
@Getter
public class DestTemeSearchQueryObject extends QueryObject {

    private  Integer tid;
    private  Integer mid;
    private  Integer did;

    public DestThemeSearchCondition getDays() {
        return DestThemeSearchCondition.DestThrmr_DAYS.get(did);
    }

    public Pageable getPageable() {
        return PageRequest.of(super.getCurrentPage() - 1, super.getPageSize());
    }
}
